package com.example.fooservice;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;

/**
 * TODO
 *
 * @author zhangjun3
 * @date 2022/3/4 22:47
 */
@Controller
@RestController
public class TokenController {

    private static final Logger log = LoggerFactory.getLogger(TokenController.class);

    @GetMapping("/token/verify/{token}")
    public ResponseEntity<Boolean> someBiz(@PathVariable("token") String token) throws InterruptedException {
        log.info("toke: " + token);
        TimeUnit.MILLISECONDS.sleep(30);
        return ResponseEntity.ok(Boolean.TRUE);
    }

}
